//package com.mapper;
//
//import com.pojo.Project;
//import org.apache.ibatis.annotations.*;
//
//import java.util.List;
//
//@Mapper
//public interface ProjectMapper {
//    // 新增项目（自动回填主键）
//    @Insert("INSERT INTO project (name, department_id, progress, create_time) " +
//            "VALUES (#{name}, #{departmentId}, #{progress}, #{createTime})")
//    @Options(useGeneratedKeys = true, keyProperty = "id")
//    void insert(Project project);
//
//    // 根据部门ID查询项目列表
//    @Select("SELECT id, name, department_id AS departmentId, progress, create_time AS createTime " +
//            "FROM project WHERE department_id = #{deptId}")
//    List<Project> selectByDepartmentId(Integer deptId);
//
//    // 根据ID查询项目详情
//    @Select("SELECT id, name, department_id AS departmentId, progress, create_time AS createTime " +
//            "FROM project WHERE id = #{id}")
//    Project selectById(Integer id);
//
//    // 动态更新项目信息
//    @Update("<script>" +
//            "UPDATE project " +
//            "<set>" +
//            "   <if test='name != null'>name = #{name},</if>" +
//            "   <if test='departmentId != null'>department_id = #{departmentId},</if>" +
//            "   <if test='progress != null'>progress = #{progress},</if>" +
//            "   update_time = NOW()" +
//            "</set>" +
//            "WHERE id = #{id}" +
//            "</script>")
//    void updateById(Project project);
//}
